<?php

namespace app\components\dataCenter\models;

use api\components\dataCenter\DataCenterSearchModel;
use api\components\dataCenter\SearchEngine;
use api\modules\app\services\MetaService;
use api\utils\StringUtil;
use app\components\dataCenter\constants\DataField;
use app\utils\TimeUtil;
use Yii;
use yii\db\Query;

class AreaEvent extends DataCenterSearchModel
{
    public function fields()
    {
        return [];
    }

    public function extraFields()
    {
        return [];
    }

    static protected function tableName()
    {
        return 'area-event';
    }

    static protected function indexType()
    {
        return SearchEngine::INDEX_TYPE_ACTIVE;
    }

    public static function commonFieldRule(array $params = [])
    {
        $db = Yii::$app->test_3;
        $query = new Query();
        return $query->from('event_field_config')->where(['state' => 1])->all($db);
    }
}
